package com.ruoze.bdp.commons;


import com.ruoze.bdp.enums.ExceptionEnum;
import com.ruoze.bdp.utils.TimeUtils;

public class ResponseDto<T> {
    private String txTime;
    private String responseCode;
    private String responseMessage;

    private T data;

    public ResponseDto(String responseMessage) {
        this.txTime = TimeUtils.getCurrentTime(TimeUtils.FORMAT_14_TEXT);
        this.responseCode = ExceptionEnum.UNKNOE_EXCEPTION.getCode();
        this.responseMessage = responseMessage;
    }

    public ResponseDto(String responseCode, String responseMessage) {
        this.txTime = TimeUtils.getCurrentTime(TimeUtils.FORMAT_14_TEXT);
        this.responseCode = responseCode;
        this.responseMessage = responseMessage;
    }

    public ResponseDto() {
    }

    public String getTxTime() {
        return txTime;
    }

    public void setTxTime(String txTime) {
        this.txTime = txTime;
    }

    public String getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }

    public String getResponseMessage() {
        return responseMessage;
    }

    public void setResponseMessage(String responseMessage) {
        this.responseMessage = responseMessage;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
